package chapter5.section4;

/**程序 5-7：演示this作用的实例
 * @author 张玮婷 20245080902061
 */

public class Account {
    private String id;
    private String name;
    private double balance;
    //定义构造方法
   public Account(String id,String name,int balance){
       this.id=id;
       this.name=name;
       this.balance=balance;
   }
   //返回对象的姓名
    public String getName(){
       return this.name;
    }
    public static void main(String[]args){
       Account act=new Account("0701101","张华",0);
        System.out.println(act.getName());
    }
}
